﻿using QFramework;

namespace ProjectMyFarmAndShe
{
    public enum ShopItemType
    {
        Buy,
        Sell
    }

    public class ShopData
    {
        public string Key;
        public ShopItemType Type;
        public string Name;
        public string Icon;
        public string Description;
        public int Price;
        //商品剩余数量
        public BindableProperty<int> Count = new BindableProperty<int>(0);

        public ShopData WithKey(string key)
        {
            Key = key;
            return this;
        }

        public ShopData WithType(ShopItemType type)
        {
            Type = type;
            return this;
        }

        public ShopData WithName(string name)
        {
            Name = name;
            return this;
        }

        public ShopData WithIcon(string icon)
        {
            Icon = icon;
            return this;
        }

        public ShopData WithDescription(string description)
        {
            Description = description;
            return this;
        }

        public ShopData WithPrice(int price)
        {
            Price = price;
            return this;
        }

        public ShopData WithCount(int count)
        {
            Count.Value = count;
            return this;
        }
    }
}